﻿@model IEnumerable<DemoAjaxQuery.Models.Product>

@{
    ViewBag.Title = "ProductsInCat";
}

<h2>ProductsInCat</h2>

<p>
    Category: @Html.ActionLink(Convert.ToString(ViewData["cat"]), "Index")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Description)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.CategoryId)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CategoryId)
        </td>
        <td>
        </td>
    </tr>
}

</table>
